package com.woody.aggregate.infrastructure.messagebox.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.woody.aggregate.infrastructure.messagebox.dto.MessageboxCountDTO;
import com.woody.aggregate.infrastructure.messagebox.entity.MessageboxConfig;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.woody.aggregate.infrastructure.messagebox.wrapmodel.MessageboxListQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 弹框配置表 Mapper 接口
 * </p>
 *
 * @author author
 * @since 2025-03-19
 */
public interface MessageboxConfigMapper extends BaseMapper<MessageboxConfig> {

    Page<MessageboxConfig> getListByDto(Page page, @Param("query") MessageboxListQuery query);
    /**
     * 查询规则绑定的弹窗数量，按弹窗状态分组
     * <br />
     * @param ruleIds
     * @return
     */
    List<MessageboxCountDTO> countByRuleIds(@Param("ruleIds") List<Integer> ruleIds);
}
